FOLDER = render
TYPE = png

all:
	-@rm *.dia~
	-@mkdir $(FOLDER)
	@for diafile in *.dia; do \
		dia --export=$(FOLDER)/$${diafile}.$(TYPE) --filter=$(TYPE) $${diafile}; \
	done

remove:
	@for file in $(FOLDER)/*.$(TYPE); do \
		rm $(FOLDER)/$${file}; \
	done
